package de.baumann.browser.present

import de.baumann.browser.api.OdinObserver
import de.baumann.browser.api.net.vo.Node
import de.baumann.browser.base.BasePresenter
import de.baumann.browser.iview.INodeListView
import de.baumann.browser.model.NodeModel

class NodeListPresenter :BasePresenter<INodeListView>(){
    fun getNodeList() {
        NodeModel().nodeList.subscribe(object : OdinObserver<List<Node>>(view) {
            override fun onSuccess(data: List<Node>?) {
                if (view != null) {
                    view.setSuperNodeList(data)
                }
            }
        })
    }
}